<div class="container-fluid">
	<div class="panel panel-default">
		<div class="panel-heading">
			<div>
			  <a href="about:blank" target="_blank">
				<button class="btn btn-info" type="button">
					<i class="icon-plus"></i>
					新建用户
				</button>
			  </a>	
			</div>
		</div>
		<div class="panel-body">
			<table class="table table-bordered table-hover table-striped table-condensed">
				<tr>
					<th>用户代码</th>
					<th>单位代码</th>
					<th>用户名</th>
					<th>完整用户名</th>
					<th style="text-align:center; width:150px;">操作</th>
				</tr>
				<#if data??> <#list data as user>
				<tr>
					<td>${user.userCode}</td>
					<td>${user.unitCode}</td>
					<td>${user.shortName}</td>
					<td>${user.fullName}</td>
					<td align="center">
						<div class="btn btn-xs permission btn-info" data-uri="user2resource.do?userId=${user.id}">
							<i class="icon-search"></i> 权限
						</div>
						<div class="btn btn-xs user2role btn-info" data-uri="user2role.do?userId=${user.id}">
							<i class="icon-magnet"></i> 角色
						</div>				  
					</td>
				</tr>
				</#list> </#if>				
			</table>
		</div>
		<div class="panel-footer">
		</div>
	</div>
</div>
<script type="text/javascript">
	$(document).ready(function() {
		$('.user2role').on('click', function() {
			var $this = $(this);
			$.suredy.showModal({
				size : 'lg',
				icon : 'icon-magnet',
				title : '用户-角色映射',
				showFoot : false,
				uri : $this.data('uri')
			});
		});	
		$('.permission').on('click', function() {
			var $this = $(this);
			$.suredy.showModal({
				size : 'lg',
				icon : 'icon-search',
				title : '用户权限定义',
				showFoot : false,
				uri : $this.data('uri')
			});
		});	
	});
</script>	